home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Resources / Partition Logic 0.61 / partlogic-0.61.iso / system / headers / limits.h < prev    next >
Text File  |  2006-01-31  |  2KB  |  57 lines

  1. // 
  2. //  Visopsys
  3. //  Copyright (C) 1998-2006 J. Andrew McLaughlin
  4. //  
  5. //  This library is free software; you can redistribute it and/or modify it
  6. //  under the terms of the GNU Lesser General Public License as published by
  7. //  the Free Software Foundation; either version 2.1 of the License, or (at
  8. //  your option) any later version.
  9. //
  10. //  This library is distributed in the hope that it will be useful, but
  11. //  WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
  13. //  General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU Lesser General Public License
  16. //  along with this library; if not, write to the Free Software Foundation,
  17. //  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. //  limits.h
  20. //
  21.  
  22. // This is the Visopsys version of the standard header file limits.h
  23.  
  24.  
  25. #if !defined(_LIMITS_H)
  26.  
  27. #define CHAR_BIT     8                      // Bits in a char
  28.  
  29. #define SCHAR_MAX    127                    // Max value of a signed char
  30. #define SCHAR_MIN    -128                   // Min value of a signed char
  31.  
  32. // Assumes that a char type is signed
  33. #define CHAR_MAX     SCHAR_MAX              // Max value of a char
  34. #define CHAR_MIN     SCHAR_MIN              // Min value of a char
  35. #define UCHAR_MAX    255                    // Max value of an unsigned char
  36.  
  37. // Assumes that a short int type is 16 bits
  38. #define SHRT_MAX     32767                  // Max value of a short int
  39. #define SHRT_MIN     -32768                 // Min value of a short int
  40. #define USHRT_MAX    65535                  // Max value of an unsigned short
  41.  
  42. // Assumes that an int type is 32 bits
  43. #define INT_MAX      2147483647             // Max value of an int
  44. #define INT_MIN      (-INT_MAX - 1)         // Min value of an int
  45. #define UINT_MAX     4294967295U            // Max value of an unsigned int
  46.  
  47. // Assumes that a long int type is 32 bits
  48. #define LONG_MAX     2147483647L            // Max value of a long int
  49. #define LONG_MIN     (-LONG_MAX - 1L)       // Min value of a long int
  50. #define ULONG_MAX    4294967295UL           // Max value of an unsigned long
  51.  
  52. // We don't support multibyte characters right now
  53. #define MB_LEN_MAX   4
  54.  
  55. #define _LIMITS_H
  56. #endif
  57.